#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int count = 0;
	int empty = 0;
	int total = 0;
	count = count + n;
	empty = empty + n;
	while (empty>=2)
	{
		count = count + empty / 2;
		empty = empty / 2 + empty % 2;
	}
	printf("%d\n", count);
	return 0;
}